package spec.wangyuhang.disanzhang.spec.__sbstract;
//子类如果继承了抽象类，就必须实现抽象类里的抽象方法
//类如果实现了接口，就必须实现接口里定义的所有方法
public class Polar extends Animal implements IAnterface {
    //成员属性
    String liangqi;
    //构造方法
    Polar(String name,String food,String area,String laingqi ){
        super.name=name;
        super.area=area;
        super.food =food;
       this.liangqi=liangqi;

    }
    //

    String findFood() {
        return name+"觅食"+ food;
    }
    @Override
    String wholelife() {
        String b= born();
        String f=findFood();
        String e=super.eat();
        String o= old();
        String d=die();
        String de=  dick();
        return b +"\n"+f+"\n"+e+"\n"+o+"\n"+de+"\n"+d;
    }
    String wholeLife() {
        return "";
    }
    public String born(){
        return name+"出生"+"1997";
    }

    @Override
    public String old() {
        return name+"变老";
    }

    @Override
    public String dick() {
        return name +"生病";
    }

    @Override
    public String die() {
        return name+"死了";
    }
}
